package com.xk._01基础篇._09集合Set.set;

/**
 * @description:
 * @author: xu
 * @date: 2022/9/26 11:04
 */
public interface Set<E> {
    int size();
    boolean isEmpty();
    void clear();
    boolean contains(E element);
    void add(E element);
    void remove(E element);
    // 遍历接口
    void traversal(Visitor<E> visitor);

    public static abstract class Visitor<E> {
        boolean stop;
        public abstract boolean visit(E element);
    }
}
